﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DATA;
using DTO;

namespace BUS
{
    public class AccountsBUS
    {
        public List<AccountDTO> GetAllAccountsList()
        {
            AccountsREP acc = new AccountsREP();
            return acc.GetAllAccounts();
        }
        public List<AccountDTO> GetActiveAccount()
        {
            AccountsREP acc = new AccountsREP();
            return acc.GetActiveAccount();
        }

        public AccountDTO Login(string uname, string pass)
        {
            AccountsREP acc = new AccountsREP();
            return acc.Login(uname, pass);
        }

        public bool AddAccount(Account newAccount)
        {
            AccountsREP acc = new AccountsREP();
            return acc.AddAccount(newAccount);
        }
        public bool DeleteAccount(string accountID)
        {
            AccountsREP acc = new AccountsREP();
            return acc.DeleteAccount(accountID);
        }
        public bool UpdateAccount(Account accountup)
        {
            AccountsREP acc = new AccountsREP();
         return   acc.UpdateAccount(accountup);

 
        }

    }
}
